An interrupt indicates that a condition exists in a computer system and requires the attention of a processor. When an interrupt (or, equivalently “event”) occurs, the source of the interrupt (e.g., a device, such as a hardware device or a software device) sends an interrupt request (IRQ) to the processor. An IRQ can be sent by means of interrupt messages (e.g., Message Signaled Interrupts (MSI-X)), changes to a voltage level on interrupt pins (e.g., pin-based interrupts), and/or other means.
A computer system generally includes multiple devices, and some devices can trigger multiple different events. A device can be programmed to generate different IRQs that identify the occurrences of different events. In a computer system that uses MSI-X, an MSI-X table stored in a device can be programmed with a number of interrupt vectors. When the device sends an IRQ to signal the occurrence of an event, the IRQ is sent with an interrupt vector assigned to the event. The interrupt vector is used by a system handler to locate the code that handles the event.
However, the total number of interrupt vectors that can be assigned to events is limited. In a personal computer system, the total number of interrupt vectors is typically limited by a number of factors, such as the amount of memory needed to track different IRQs in the operating system, the number of different interrupt input lines on a Programmable Interrupt Controller (PIC), or other factors.
Some conventional computer systems support interrupt vector sharing, allowing the same interrupt vector to be used to report multiple different events. The sharing allows a computer system to use a small number of interrupt vectors to report a large number of events to the processor. Conventional computer systems allocate the interrupt vectors statically at device initialization or system startup time. Upon detection of an event, the computer system polls each device and event type that shares the same interrupt vector to verify which event has taken place. Device polling at runtime increases the overhead for interrupt handling and degrades the performance of the system.